#include <REGX52.H>
#include "LCD1602.h"
#include "DS1302.h"

//普中开发板
//LCD乱码将J24右两针脚短接！！！！！！！！！！！！
void main()
{
	LCD_Init();
	DS1302_Init();
	DS1302_Write_Time();
	LCD_ShowNum(1,1,20,2);
	LCD_ShowChar(1,5,'.');
	LCD_ShowChar(1,8,'.');
	LCD_ShowChar(2,3,':');
	LCD_ShowChar(2,6,':');
	LCD_ShowString(2,12,"DAY");
	LCD_ShowChar(2,15,':');
	while(1)
	{
		DS1302_Read_Time();
		LCD_ShowNum(1,3,DS1302_Time[0],2);
		LCD_ShowNum(1,6,DS1302_Time[1],2);
		LCD_ShowNum(1,9,DS1302_Time[2],2);
		LCD_ShowNum(2,1,DS1302_Time[3],2);
		LCD_ShowNum(2,4,DS1302_Time[4],2);
		LCD_ShowNum(2,7,DS1302_Time[5],2);
		LCD_ShowNum(2,16,DS1302_Time[6],1);
		
	}
}
